package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.mammonhall.MammonHallSourceDataInfo;
import com.yanqu.road.entity.activity.mammonhall.MammonHallTimeInfo;
import com.yanqu.road.entity.activity.mammonhall.MammonHallUserData;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class MammonHallBusiness {

    public static List<MammonHallTimeInfo> getTimeInfoList(int activityId) {
        return DaoHelper.getMammonHallConfigDaoImpl().getMammonHallTimeInfoList(activityId);
    }

    public static MammonHallUserData getUserDataByUserId(long userId, int activityId) {
        return DaoHelper.getMammonHallUserDataDaoImpl().getMammonHallUserData(userId, activityId);
    }

    public static Map<Integer, List<MammonHallSourceDataInfo>> getRankList() {
        return DaoHelper.getMammonHallConfigDaoImpl().getMammonHallSourceDataInfoList();
    }

    public static boolean addMammonHallUserData(MammonHallUserData userData) {
        return DaoHelper.getMammonHallUserDataDaoImpl().add(userData);
    }

    public static boolean updateMammonHallUserData(MammonHallUserData userData) {
        return DaoHelper.getMammonHallUserDataDaoImpl().update(userData);
    }
}
